<template>
	<view class="form-item">
		<view class="item-info">
			<checkbox-group @change="change" style="margin: 0rpx 34rpx;">
				<label>
					<checkbox value="1"  style="transform:scale(0.7)"/>
				</label>
			</checkbox-group>
			<view class="item-title">
				{{title}}
			</view>
		</view>
		<view class="item-content" v-if="content">
			生猪年出栏≥2000 头，奶牛存栏≥1000 头，肉牛年出栏≥200 头，肉羊年出栏≥500 头，蛋鸡存栏≥10000 只，肉鸡年出栏≥40000 只。
		</view>
	</view>
</template>

<script>
	export default {
		name:"FromItem",
		data() {
			return {
				isSelect:false,
			};
		},
		props:{
			title:{
				default:'',
				typeof:String
			},
			type:{
				default:'input',
				typeof:String
			},
			content:{
				default:'',
				typeof:String
			},
		},
		methods: {
			change(val){
				if (val.detail.value.length > 0) {
					this.isSelect = true
				} else{
					this.isSelect = false
				}
				this.$emit('change',this.isSelect)
			},
		},
	}
</script>

<style lang="scss">
	.form-item{
		border-bottom: 1rpx solid #E1E0E0;
	}
.item-info{
	display: flex;
	align-items: center;
	min-height: 86rpx;
	// padding: 10rpx 0rpx;
	justify-content: space-between;
}
.item-title{
	font-size: 28rpx;
	color: #666666;
	text-align: left;
	flex: 1;
}
	
.item-content{
	font-weight: 400;
	font-size: 24rpx;
	color: #EA3F3F;
	line-height: 39rpx;
	padding: 0rpx 38rpx;
}
</style>